
<script type="text/html" data-template-name="rpi-sensehat in">
    <div class="form-row">
        <label><i class="fa fa-arrow-right"></i> <span data-i18n="sensehat.label.outputs"></label>
        <label style="width: auto" for="node-input-motion"><input style="vertical-align: top; width: auto; margin-right: 5px;" type="checkbox" id="node-input-motion"> <span data-i18n="sensehat.label.motionEvents"></label>
        <div style="padding-left: 125px; margin-top: -5px; color: #bbb;" data-i18n="sensehat.label.motionEventsExamples"></div>
    </div>
    <div class="form-row">
        <label></label>
        <label style="width: auto" for="node-input-env"><input style="vertical-align: top; width: auto; margin-right: 5px;" type="checkbox" id="node-input-env"> <span data-i18n="sensehat.label.environmentEvents"></label>
        <div style="padding-left: 125px; margin-top: -5px; color: #bbb;" data-i18n="sensehat.label.environmentEventsExamples"></div>
    </div>
    <div class="form-row">
        <label></label>
        <label style="width: auto" for="node-input-stick"><input style="vertical-align: top; width: auto; margin-right: 5px;" type="checkbox" id="node-input-stick"> <span data-i18n="sensehat.label.joystickEvents"></label>
    </div>

    <div class="form-row">
        <label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></label>
        <input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
    </div>
</script>

<script type="text/html" data-template-name="rpi-sensehat out">
    <div class="form-row">
        <label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></label>
        <input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
    </div>
</script>

<script type="text/javascript">
    RED.nodes.registerType('rpi-sensehat in',{
        category: 'Raspberry Pi',
        paletteLabel: "Sense HAT",
        color:"#c6dbef",
        defaults: {
            name: { value:"" },
            motion: { value: true },
            env: { value: true },
            stick: { value: true }
        },
        inputs:0,
        outputs:1,
        icon: "rpi.png",
        label: function() {
            return this.name||"Sense HAT";
        },
        labelStyle: function() {
            return this.name?"node_label_italic":"";
        }
    });

    RED.nodes.registerType('rpi-sensehat out',{
        category: 'Raspberry Pi',
        paletteLabel: "Sense HAT",
        color:"#c6dbef",
        defaults: {
            name: { value:"" },
        },
        inputs:1,
        outputs:0,
        icon: "rpi.png",
        align: "right",
        label: function() {
            return this.name||"Sense HAT";
        },
        labelStyle: function() {
            return this.name?"node_label_italic":"";
        }
    });
</script>
